package com.borrowed.book.weixin.entity;

import io.swagger.models.auth.In;

import java.io.Serializable;

/**
 * 
 * @TableName s_order_pay
 */
public class SOrderPay implements Serializable {
    /**
     * 微信支付系统生成的订单号。
     */
    private String transactionId;

    /**
     * 直连商户申请的公众号或移动应用appid。

     */
    private String appid;

    /**
     * 商户号
     */
    private String mchid;

    /**
     * 商户订单号
     */
    private String outTradeNo;

    /**
     * 交易类型，枚举值：
JSAPI：公众号支付
NATIVE：扫码支付
APP：APP支付
MICROPAY：付款码支付
MWEB：H5支付
FACEPAY：刷脸支付
     */
    private String tradeType;

    /**
     * 交易状态，枚举值：
SUCCESS：支付成功
REFUND：转入退款
NOTPAY：未支付
CLOSED：已关闭
REVOKED：已撤销（付款码支付）
USERPAYING：用户支付中（付款码支付）
PAYERROR：支付失败(其他原因，如银行返回失败)
     */
    private String tradeState;

    /**
     * 交易状态描述
     */
    private String tradeStateDesc;

    /**
     * 付款银行
     */
    private String bankType;

    /**
     * 附加数据，在查询API和支付通知中原样返回，可作为自定义参数使用
     */
    private String attach;

    /**
     * 支付完成时间，
     */
    private String successTime;

    /**
     * 用户标识	
     */
    private String openid;

    /**
     * 订单总金额，单位为分。
     */
    private Integer total;

    /**
     * 用户支付金额，单位为分
     */
    private Integer payerTotal;

    /**
     * 货币类型	
     */
    private String currency;

    /**
     * 用户支付币种
     */
    private String payerCurrency;

    private static final long serialVersionUID = 1L;

    /**
     * 微信支付系统生成的订单号。
     */
    public String getTransactionId() {
        return transactionId;
    }

    /**
     * 微信支付系统生成的订单号。
     */
    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    /**
     * 直连商户申请的公众号或移动应用appid。

     */
    public String getAppid() {
        return appid;
    }

    /**
     * 直连商户申请的公众号或移动应用appid。

     */
    public void setAppid(String appid) {
        this.appid = appid;
    }

    /**
     * 商户号
     */
    public String getMchid() {
        return mchid;
    }

    /**
     * 商户号
     */
    public void setMchid(String mchid) {
        this.mchid = mchid;
    }

    /**
     * 商户订单号
     */
    public String getOutTradeNo() {
        return outTradeNo;
    }

    /**
     * 商户订单号
     */
    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    /**
     * 交易类型，枚举值：
JSAPI：公众号支付
NATIVE：扫码支付
APP：APP支付
MICROPAY：付款码支付
MWEB：H5支付
FACEPAY：刷脸支付
     */
    public String getTradeType() {
        return tradeType;
    }

    /**
     * 交易类型，枚举值：
JSAPI：公众号支付
NATIVE：扫码支付
APP：APP支付
MICROPAY：付款码支付
MWEB：H5支付
FACEPAY：刷脸支付
     */
    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    /**
     * 交易状态，枚举值：
SUCCESS：支付成功
REFUND：转入退款
NOTPAY：未支付
CLOSED：已关闭
REVOKED：已撤销（付款码支付）
USERPAYING：用户支付中（付款码支付）
PAYERROR：支付失败(其他原因，如银行返回失败)
     */
    public String getTradeState() {
        return tradeState;
    }

    /**
     * 交易状态，枚举值：
SUCCESS：支付成功
REFUND：转入退款
NOTPAY：未支付
CLOSED：已关闭
REVOKED：已撤销（付款码支付）
USERPAYING：用户支付中（付款码支付）
PAYERROR：支付失败(其他原因，如银行返回失败)
     */
    public void setTradeState(String tradeState) {
        this.tradeState = tradeState;
    }

    /**
     * 交易状态描述
     */
    public String getTradeStateDesc() {
        return tradeStateDesc;
    }

    /**
     * 交易状态描述
     */
    public void setTradeStateDesc(String tradeStateDesc) {
        this.tradeStateDesc = tradeStateDesc;
    }

    /**
     * 付款银行
     */
    public String getBankType() {
        return bankType;
    }

    /**
     * 付款银行
     */
    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    /**
     * 附加数据，在查询API和支付通知中原样返回，可作为自定义参数使用
     */
    public String getAttach() {
        return attach;
    }

    /**
     * 附加数据，在查询API和支付通知中原样返回，可作为自定义参数使用
     */
    public void setAttach(String attach) {
        this.attach = attach;
    }

    /**
     * 支付完成时间，
     */
    public String getSuccessTime() {
        return successTime;
    }

    /**
     * 支付完成时间，
     */
    public void setSuccessTime(String successTime) {
        this.successTime = successTime;
    }

    /**
     * 用户标识	
     */
    public String getOpenid() {
        return openid;
    }

    /**
     * 用户标识	
     */
    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getPayerTotal() {
        return payerTotal;
    }

    public void setPayerTotal(Integer payerTotal) {
        this.payerTotal = payerTotal;
    }

    /**
     * 货币类型	
     */
    public String getCurrency() {
        return currency;
    }

    /**
     * 货币类型	
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    /**
     * 用户支付币种
     */
    public String getPayerCurrency() {
        return payerCurrency;
    }

    /**
     * 用户支付币种
     */
    public void setPayerCurrency(String payerCurrency) {
        this.payerCurrency = payerCurrency;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SOrderPay other = (SOrderPay) that;
        return (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getAppid() == null ? other.getAppid() == null : this.getAppid().equals(other.getAppid()))
            && (this.getMchid() == null ? other.getMchid() == null : this.getMchid().equals(other.getMchid()))
            && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
            && (this.getTradeType() == null ? other.getTradeType() == null : this.getTradeType().equals(other.getTradeType()))
            && (this.getTradeState() == null ? other.getTradeState() == null : this.getTradeState().equals(other.getTradeState()))
            && (this.getTradeStateDesc() == null ? other.getTradeStateDesc() == null : this.getTradeStateDesc().equals(other.getTradeStateDesc()))
            && (this.getBankType() == null ? other.getBankType() == null : this.getBankType().equals(other.getBankType()))
            && (this.getAttach() == null ? other.getAttach() == null : this.getAttach().equals(other.getAttach()))
            && (this.getSuccessTime() == null ? other.getSuccessTime() == null : this.getSuccessTime().equals(other.getSuccessTime()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getTotal() == null ? other.getTotal() == null : this.getTotal().equals(other.getTotal()))
            && (this.getPayerTotal() == null ? other.getPayerTotal() == null : this.getPayerTotal().equals(other.getPayerTotal()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
            && (this.getPayerCurrency() == null ? other.getPayerCurrency() == null : this.getPayerCurrency().equals(other.getPayerCurrency()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getAppid() == null) ? 0 : getAppid().hashCode());
        result = prime * result + ((getMchid() == null) ? 0 : getMchid().hashCode());
        result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
        result = prime * result + ((getTradeType() == null) ? 0 : getTradeType().hashCode());
        result = prime * result + ((getTradeState() == null) ? 0 : getTradeState().hashCode());
        result = prime * result + ((getTradeStateDesc() == null) ? 0 : getTradeStateDesc().hashCode());
        result = prime * result + ((getBankType() == null) ? 0 : getBankType().hashCode());
        result = prime * result + ((getAttach() == null) ? 0 : getAttach().hashCode());
        result = prime * result + ((getSuccessTime() == null) ? 0 : getSuccessTime().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getTotal() == null) ? 0 : getTotal().hashCode());
        result = prime * result + ((getPayerTotal() == null) ? 0 : getPayerTotal().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        result = prime * result + ((getPayerCurrency() == null) ? 0 : getPayerCurrency().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", transactionId=").append(transactionId);
        sb.append(", appid=").append(appid);
        sb.append(", mchid=").append(mchid);
        sb.append(", outTradeNo=").append(outTradeNo);
        sb.append(", tradeType=").append(tradeType);
        sb.append(", tradeState=").append(tradeState);
        sb.append(", tradeStateDesc=").append(tradeStateDesc);
        sb.append(", bankType=").append(bankType);
        sb.append(", attach=").append(attach);
        sb.append(", successTime=").append(successTime);
        sb.append(", openid=").append(openid);
        sb.append(", total=").append(total);
        sb.append(", payerTotal=").append(payerTotal);
        sb.append(", currency=").append(currency);
        sb.append(", payerCurrency=").append(payerCurrency);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}